package com.ae.shield.common.enchantment.shieldSuffix;

import net.minecraft.enchantment.Enchantment;

import javax.annotation.Nonnull;

public class SuperLoadAlpha extends SuffixBase {
    public SuperLoadAlpha() {
        super(new SuffixRate()
                .upper(0.25f, 1)
                .intensity(-0.07f, 1)
                .cost(0.07f, 1));
    }

    @Override
    public float levelRate(int level, SuffixProperty property, float rate) {
        switch (property) {
            case UPPER_LIMIT:
            case COST:
            case INTENSITY:
                return rate * level;
            default:
                return rate;
        }
    }

    @Override
    protected boolean canApplyTogether(@Nonnull Enchantment enchantment) {
        return enchantment != SuffixList.SUPER_LOAD_BETA.get() && super.canApplyTogether(enchantment);
    }
}
